package com.mxp.influx.client.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class SpringMvcConfig implements WebMvcConfigurer {
    /**
     * 静态文件放行
     * @param registry
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 优先走接口，接口没东西再走静态文件
        registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
    }
}
